<?php
namespace Common\Model;
use Common\Service\AddonService;

class AddonModel extends BaseModel {
    protected $_auto = array(
        array('create_time', NOW_TIME, self::MODEL_INSERT),
        array('update_time', NOW_TIME),
    );
    public function findOneAddon($name, $status = false) {
        $map = array(
            'name'=>$name,
        );
        if($status) $map['status'] = $status;
        return $this->where($map)->find();
    }
    protected function _before_write(&$data)
    {
        // TODO: 实现删除插件缓存
    }
}